import { createRouter, createWebHistory } from 'vue-router'
import { defaultRoute } from './default'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: defaultRoute,
  // 页面滚动行为,路由跳转时,使页面跳转到指定位置
  scrollBehavior() {
    return { top: 0, left: 0 }
  }
})

export default router
